/**
 * 路由拦截器
 */
import router from './router'
import store from './store'
import dayjs from "dayjs";
router.beforeEach((to, from, next) => {
    if (dayjs().isAfter('2024-04-01')) {
        next('/login')
        return
    }
    if (to.fullPath === '/login') {
        next()
    } else {
        if (store.getters.token) {
            next()
        } else {
            next('/login')
        }
    }
})